package com.nwpu.coursesupport.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.nwpu.coursesupport.entity.bean.JSONResult;

@Controller
@RequestMapping("/scorePerformance")
public class ScorePerformanceController extends AbstractController{

	@RequestMapping("/ajaxListViewData")
	@ResponseBody
	public JSONResult listViewData(@RequestParam("id")int id){
		JSONResult rst=invokeService("scorePerformance", "listView", "{\"id\":\"" + id + "\"}");
		return rst;
	}
	
	@RequestMapping("/ajaxListData")
	@ResponseBody
	public JSONResult listData(@RequestParam("id")int id){
		JSONResult rst=invokeService("scorePerformance", "list", "{\"id\":\"" + id + "\"}");
		return rst;
	}
	@RequestMapping("/scorePerform")
	@ResponseBody
	public JSONResult scorePerform(@RequestParam("data")String data){
		JSONResult rst=invokeService("scorePerformance", "scorePerform", data);
		return rst;
	}	
}
